/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f0f2f5;
}

/* 侧边栏菜单项图标样式 */
.el-submenu__title i,
.el-menu-item i {
    margin-right: 8px !important;
    font-size: 16px !important;
    display: inline-block !important;
    width: 20px !important;
    height: 20px !important;
    line-height: 20px !important;
    text-align: center !important;
}

/* 确保Element UI图标可见 */
.el-menu {
    font-family: 'element-icons', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 下拉菜单展开/折叠图标样式 */
.el-submenu__icon-arrow {
    margin-left: auto;
}

/* 增强下拉菜单标题图标样式 */
.el-submenu > .el-submenu__title > i {
    font-size: 16px !important;
    margin-right: 8px !important;
    color: #606266 !important;
}

/* 增强子菜单项图标样式 */
.el-menu-item > i {
    font-size: 14px !important;
    margin-right: 8px !important;
    color: #606266 !important;
}

/* 表格样式 */
.el-table {
    margin-top: 10px;
}

.el-table th {
    background-color: #fafafa !important;
}

/* 卡片样式 */
.el-card {
    margin-bottom: 20px;
}

/* 按钮样式 */
.el-button {
    margin-right: 10px;
}

/* 表单样式 */
.el-form-item {
    margin-bottom: 20px;
}

/* 滚动条样式 */
.el-main::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.el-main::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.el-main::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.el-main::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 设备控制页面样式 */
#device-screen {
    transition: all 0.3s ease;
}

#device-screen:hover {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.no-screen {
    font-size: 14px;
    color: #909399;
}

/* 弹窗样式 */
.el-dialog__header {
    background-color: #fafafa;
    border-bottom: 1px solid #ebeef5;
}

/* 加载动画 */
.loading-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .el-aside {
        display: none;
    }
    
    .el-main {
        padding: 10px;
    }
    
    #device-screen img {
        max-width: 100%;
        height: auto;
    }
}